package com.yzl.builder;

/**
 * @program: design-pattern
 * @description:将产品和产品的创建过程进行解耦，使用相同的创建过程不通的产品，控制产品生产过程
 *              Director是全程指导组装过程，具体的细节还是builder去操作
 * @author: YaoZhiLi
 * @create: 2021-08-08 01:18
 */
public class Director {
    public Computer create(Builder builder){
        builder.buildCpu();
        builder.buildMemory();
        builder.buildPower();
        builder.buildMainBoard();
        builder.buildDisk();
        return builder.createComputer();
    }
}